<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
<style>
body {
  color: #000;
  font-family: 'trebuchet ms', verdana, sans-serif;
  font-size: 10px;
}
.decimal li { list-style-type: decimal; }
.lower-alpha li { list-style-type: lower-alpha; }
.lower-latin li { list-style-type: lower-latin; }
.lower-roman li { list-style-type: lower-roman; }
.upper-alpha li { list-style-type: upper-alpha; }
.upper-latin li { list-style-type: upper-latin; }
.upper-roman li { list-style-type: upper-roman; }
.decimal-leading-zero li { list-style-type: decimal-leading-zero; }

@page {
	margin-top: 1em;
	margin-left: 1em;
	margin-right: 1em;
}

table {
	font-size:10px;
}
table.gridtable {
	font-family: verdana,arial,sans-serif;
	font-size:10px;
	color:#333333;
	border-width: 1px;
	border-color: #666666;
	border-collapse: collapse;
}
table.gridtable th {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #666666;
	background-color: #dedede;
}
table.gridtable td {
	border-width: 1px;
	padding: 2px;
	border-style: solid;
	border-color: #666666;
	background-color: #ffffff;
}
tr{
	vertical-align : top ;
}
</style>
</head>
<body>
	<b>PT PP (Persero), Tbk<br />
	<?php echo $form->branch_name; ?><br />
	PROYEK : <?php echo $form->project_name; ?></b><br />
	<center><h2 style="margin:1px">SURAT PERINTAH KERJA<br />
	( SPK )</h2>
	</center>
	<table width=100%>
	<tr  valign=top>
	<td width=50%></td>
	<td>
		<table cellpadding=0 cellspacing=0 border=0 >
		<tr>
			<td>1.
			</td>
			<td>Nomor
			</td>
			<td>: <b><?php echo $spk_no; ?></b>
			</td>
		</tr>
		<tr>
			<td>2.
			</td>
			<td>Tanggal
			</td>
			<td>: <b><?php echo $this->m_public_function->indonesiaDate($spk_date); ?></b>
			</td>
		</tr>
		</table>
	</div>
	</td>
	</tr>
	<tr  valign=top>
	<td colspan=2>
	<table cellpadding=0 cellspacing=0 border=0 >
		<tr>
		<td>3.
		</td>
		<td>Subkontraktor
		</td>
		<td>: <b><?php echo $form->vendor_name; ?></b>
		</td>
	</tr>
	<tr valign=top>
		<td>4.
		</td>
		<td>Alamat
		</td>
		<td>: <b><?php echo $form->vendor_address; ?><br />
			&nbsp;&nbsp;Telp : <?php echo $form->vendor_phone; ?>
			&nbsp;&nbsp;Fax : <?php echo $form->vendor_fax; ?></b>
		</td>
	</tr>
	<tr>
		<td>5.
		</td>
		<td>Jenis Pekerjaan
		</td>
		<td>: <b><?php echo $form->job_name; ?></b>
		</td>
	</tr>
	</table>
	</td></tr>
	</table>
	<br />
	
		<table class="gridtable" width=100%>
		<tr>
			<th>6. No.</th>
			<th>7. Uraian Pekerjaan</th>
			<th>8. Volume</th>
			<th>9. Sat.</th>
			<th>10. Spesifikasi.</th>
			<th>11. Harga Satuan.</th>
			<th>12. Jumlah.</th>
		</tr>
		
		<?php	
			$i = 0;
			$a = 0;
			
					$order = "center>".$i;
			$total = 0;
			$row = count($table);
			$j = 1;
			foreach($table as $tb){
				if ($tb->depth == 0){
					$i ++;
					$a = 0;
					$order = "center>".$i;
				}else{
					if ($a == 0 ){
						$c = 'a';
					}else{
						$c++;
					}
					$a++;
					$order = "right>".$c;
				}
				
				echo "
				<tr valign=top>
				<td align=".$order."</td>
				<td>".$tb->jobdet_name."</td>
				<td align=right>".number_format($tb->kompdet_vol,0,',','.')."</td>
				<td >".$tb->unit_name."</td>
				";
				if (($jenis == 'Umum')){
					if ($j == 1){
						echo "<td rowspan=".$row." >".$spek."</td>";
						$j++;
					}
				}else{
					echo "<td >".$spek[$tb->kompdet_id]."</td>";
				} 
				echo "
				<td align=right>".number_format($tb->kompdet_price,2,',','.')."</td>
				<td align=right>".number_format($tb->kompdet_price * $tb->kompdet_vol,2,',','.')."</td></tr>";
				$total = $total + ($tb->kompdet_price * $tb->kompdet_vol) ;
			}
		?>
			
		<tr>
			<td colspan=6>Sub total<br></td>
			<td align=right><?php 
				echo number_format($total,2,',','.');
				$ppn = $total * ( 10 / 100);
			?></td>
		</tr>
		<tr>
			<td colspan=6>PPN 10%</td>
			<td align=right><?php echo number_format($ppn,2,',','.'); 
				$total = $total + $ppn;
			?></td>
		</tr>
		<tr>
			<td colspan=6>Total NK<br>Pembulatan</td>
			<td align=right><?php echo number_format($total,2,',','.'); ?><br><b>
			<?php echo number_format(round($total,-3),2,',','.'); ?></b></td>
		</tr>
		<tr>
			<td colspan=7>Terbilang : <?php echo ucfirst( $this->m_public_function->terbilang(round($total,-3))); ?> rupiah<br>
			(Termasuk PPN % & PPh)<br>
			<b>Sifat kontrak LUMP SUM FIXED PRICE berdasarkan gambar yang diterima</b></td>
		</tr>
	</table>
	<br />

	<table>
		<tr>
		<td>12.
		</td>
		<td>Lain-lain
		</td>
		<td>: Segala yang berhubungan dengan pekerjaan ini telah diatur dalam kontrak & lampiran-lampirannya.
		</td>
	</tr>
	<tr>
		<td>13.
		</td>
		<td>Waktu pelaksanaan
		</td>
		<td>: <?php echo $waktu_no; ?> Hari sejak tgl <?php echo $this->m_public_function->indonesiaDate($spk_date); ?> s/d 
		<?php echo $this->m_public_function->indonesiaDate(date('Y-m-d',strtotime($spk_date."+".$waktu_no." day"))); ?><br />
			&nbsp;&nbsp;Jaminan Pelaksanaan 5 % x NK , masa pemeliharaan 180 hari
		</td>
	</tr>
	<tr valign=top>
		<td>14.
		</td>
		<td>Cara Pembayaran
		</td>
		<td> : <?php echo $bayar ?> <br />
			&nbsp;&nbsp;Sisa sesuai progress & pembayaran (terlampir)<br />
			&nbsp;&nbsp;Retensi 5 %
		</td>
	</tr>
	<tr valign=top >
		<td>15.
		</td>
		<td>Kewajiban SubKontraktor :
		</td >
		<td><ol type=a style="margin:0px">
			<li>Menyediakan alat berat sesuai kebutuhan & jadual proyek</li>
			<li>Menyediakan Shop drawing s/d disetujui PTPP/OWNER</li>
			<li>Menyediakan alat-alat keselamatan kerja pelindung diri & Pengaman Kerja (APD & APK)</li>
			<li>Menjaga kebersihan, kerapihan pekerjaan subkon</li>
			<li>Menjaga keamanan pekerjaan dalam lokasi proyek</li>
			<li>Bertanggung jawab atas mutu hasil pekerjaan subkon</li>
		</ol>
		</td>
	</tr>
	<tr>
		<td>16.
		</td>
		<td>Sanksi
		</td>
		<td>: Denda keterlambatan 1 % ( satu permil ) per hari maksimum 5 % ( lima persen ) dari NK
		</td>
	</tr>
	</table>
	
	<br />
	<table  width=100%>
	<tr>
	<td width=30% align=center >
	Yang menerima order<br />
	<?php echo $form->vendor_name; ?>
	<br />&nbsp;
	<p height=35px>&nbsp;</p>
	<p height=35px>&nbsp;</p>
	
	<u><b>
	<?php echo $form->vendor_dir; ?></b></u><br />
	<?php echo $form->vendor_dirpos; ?>
	</td>
	<td width=5%>
	&nbsp;
	</td>
<td width=55% align=center>
	Yang memberi order<br />
	PT PP (Persero) Tbk.<br />
	<?php echo $form->branch_name; ?>
	<p height=35px>&nbsp;</p>
	
	<p height=35px>&nbsp;</p>
	
	<table width=100%>
		<tr>	
		<?php if ($total > 5000000000) { ?>
		<td align=center><b><u><?php echo $form->kdvo_name; ?></u></b><br /><?php echo  $form->kdvo_pos; ?></td>
		<td width='5px'>&nbsp;</td>
		<?php } ?>
		<td align=center><b><u><?php echo $form->proc_name; ?></u></b><br /><?php echo $form->proc_pos; ?></td>
		<td width='5px'>&nbsp;</td>
		<td align=center><b><u><?php echo $form->pm; ?></u></b><br />PM</td>	
		</tr>
	<table >
	
	</td>
	</tr>
	</table>
</body>
</html>